{extend name="layout/base" /}
{block name="header"}
{include file="common/search"}
{/block}
{block name="content"}
<div class="mb20">
    <!--Banner-->
    <div class="banner" id="index-banner">
        <div class="banner-pics">
            <ul class="banner-pics-list OnSale-banner">
                {volist name="banner" id="v"}
                <li><a href="{$v.url}"><img src="http://shang.cloudtimes.top{$v.img}" alt=""/></a></li>
                {/volist}
            </ul>
            <span class="site-view">浏览量：{$siteView}</span>
        </div>
        <ul class="banner-tit">
            {volist name="banner" id="v" key="k"}
            <li {if condition="$k eq 1"}class="on"{/if}></li>
            {/volist}
        </ul>
    </div>
    <div class="">
        <div class="scrollbox">
            <div id="scrollDiv">
                <ul>
                    {volist name="article" id="v"}
                    <li><h3><a href="{:url('article/info', ['id' => $v['id']])}" class="linktit">{$v.title}</a></h3></li>
                    {/volist}
                </ul>
            </div>
        </div>
        <div>
            <a href="{:url('article/list')}" style="background: #fff; color: #353535; padding: .7rem;">更多</a>
        </div>
        <div class="clearfix"></div>
    </div>
    <div class="ind-nav ind-nav1">
        <ul class="category clearfix">
            {volist name="category" id="v"}
            <li><div><a href="{:url('brand/index', ['category_id' => $v['id']])}"><i><img src="{$v.image}"></i><em>{$v.name}</em></a></div></li>
            {/volist}
        </ul>
    </div>

    <div class="extra">
        <div class="container">
            <div class="btn-list">
                <a href="javascript:;" class="color-btn">为您推荐</a>
                <a href="{:url('user/business')}">在线入住</a>
                <a href="{:url('today/index')}">今日特价</a>
            </div>
            <div class="ind-item">
                {volist name="adlist" id="v"}
                <a href="{$v.url}">
                    <img src="{$v.img}">
                </a>
                {/volist}
                <p class="center">加载完毕</p>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="footer"}
{include file="common/footer" /}
{/block}
{block name="script"}
<script src="__CDN__/assets/js/TouchSlide.1.1.js"></script>
<script src="__CDN__/assets/js/jq_scroll.js" type="text/javascript"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
TouchSlide({
    slideCell:"#index-banner",
    titCell:".banner-tit li",//开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
    mainCell:".banner-pics-list",
    effect:"left",
    autoPlay:true,//自动播放
});
$('.area-box a').click(function() {
    var area_id = $(this).data('id');
    $(this).addClass('red').siblings().removeClass('red');
    $.ajax({
    	url: "{:url('index/setarea')}",
        dataType: 'GET',
    	data: {area_id: area_id},
        success: function(data) {
            console.log(data);
        }
    })
});
$(document).ready(function(){
    $("#scrollDiv").Scroll({line:1,speed:500,timer:3000});
});

wx.config({$js->config(array('onMenuShareTimeline', 'onMenuShareAppMessage'), false)});
wx.ready(function () {      //需在用户可能点击分享按钮前就先调用
    wx.onMenuShareTimeline({
        title: '', // 分享标题
        link: '', // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
        imgUrl: 'http://shang.cloudtimes.top/assets/img/logo.jpeg', // 分享图标
        success: function () {
          // 设置成功
        }
    });
    wx.onMenuShareAppMessage({
        title: '', // 分享标题
        link: '', // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
        desc: '商情瞭望', // 分享描述
        imgUrl: 'http://shang.cloudtimes.top/assets/img/logo.jpeg', // 分享图标
        success: function () {
          // 设置成功
        }
    });
});
</script>
{/block}
